<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
	<link rel="stylesheet" type="text/css" href="../c/animate.css" />
	<style>
		body {
		background-color:transparent;
		}
		/*签到窗口*/
		#t{
			position: fixed;
			top: 0;
			width: 100%;
			height: 100%;
			left:0;
			background-color:rgba(0,0,0,0.9);
			z-index: 1
		}
		#qiandao_msg {
			width: 100%;
			position: fixed;
			top: 50%;
			left: 50%;
			-moz-transform: translate(-50%, -50%);
			-ms-transform: translate(-50%, -50%);
			-webkit-transform: translate(-50%, -50%);
			transform: translate(-50%, -50%);
			z-index: 2;
		}
		#qiandao_msg .img{
			width: 16rem;
			margin: 0 auto;
			padding: 1rem;
		}
		#qiandao_msg img#zhuli {
			margin: 0 auto;
			width: 100%;
		}

		#qiandao_msg #text {
			position: absolute;
			top: 0rem;
			text-align: center;
			margin: 0 auto;
			width: 100%;
			color: #fff;
			padding-top: 15%;
			z-index: 1;
		}

		#qiandao_msg #text p.b {
			font-size: 1rem;
			color: #fff;
		}

		#qiandao_msg #text p.b b {
			font-size: 1.5rem;
		}

		#qiandao_msg p {
			color: #fff;
			font-size: 0.7rem;
			padding-top: 0.5rem
		}

		#qiandao_msg .btn {
			position: relative;
			text-align: center;
			width: 100%;
			padding-top: 1rem;
		}

		#qiandao_msg .sx-btn {
			width: 60%;
			background: #e51c23;
			text-align: center;
			padding: 0.35rem 0;
			border-radius: 1rem;
			margin: 0.3rem auto;
		}

		#qiandao_msg .btn .p {
			font-size: 0.65rem;
			opacity: 0.7
		}

		#qiandao_msg .btn .x {
			width: 1.3rem;
			text-align: center;
			margin: 0 auto;
			margin-top: 2rem;
		}
		/*#qiandao_msg img#zhuli{
			width: 65%;
		}*/
		.img{
			position: relative;
		}


		.xiamian{
			position: absolute;
			bottom: 0;
			left: 0;
			right:0;
			/*margin-bottom: 3rem;*/
		}
		.xiamian .jindu{
			position: relative;
			width: 8rem;
			margin: 0 auto;
		}
		.xiamian .p{
			background:#fbc388;
			display: inline-block;
			float: right;
			color: #c8292e;
			border-radius: 0.75rem;
			padding: 0.1rem 0.35rem;
			text-align: center;
			font-size: 0.55rem;
			margin-bottom: 0.25rem;
		}
		.jindu .aui-progress{
			border-radius: 20rem;
			height: 0.25rem;
			background: rgba(255, 255, 255, 0.3);
		}
		.jindu .aui-progress-bar{
			background-image: linear-gradient(to right,rgba(251, 154, 93, 1), rgba(243, 198,177, 1));
			-webkit-transition:all 1s
		}
		.xiamian .p2{
			font-size: 0.6rem;
			color: #fbc388;
			text-align: center;
			padding: 0.5rem 0;
		}
		.fenxiang{
			width: 11rem;
			text-align: center;
			margin: 0 auto;
			padding-bottom: 1.5rem;
			padding-top: 0.5rem;
		}
		.an img.png{
			text-align: center;
			height: 2.2rem;
			width: 100%;
		}
		.an{
			position: relative;
		}
		.an div{
			display: flex;
			justify-content: center;
			align-items: center;
			color: #cb3536;
			position: absolute;
			top: 0;
			left: 0;
			padding-top: 0.5rem;
			text-align: center;
			width: 100%;
			font-size: 0.85rem;
			font-weight: bold;
		}
		#qiandao_msg .an div img{
			width: 1.2rem;
			margin-right: 0.25rem;
		}
		.img .text{
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			text-align: center;
			padding-top: 7rem;
			color:#fbc388;
			font-size: 1.5rem;
		}
		.img .xia{
			position: absolute;
			bottom: 0;
			left: 0;
			width: 100%;
			margin-bottom: 3rem;
		}
		.img .xia .x1{
			width: 10rem;
			text-align: center;
			margin: 0 auto;
			position: relative;
		}
		.img .xia .x1 .x1_text{
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			padding-top: 0.2rem
		}
		.img .xia .x1 .x1_text h4{
			color: #fbc388;
			font-size: 0.8rem;
		}
		#qiandao_msg	.img .xia .x1 .x1_text p{
			color:#fbc388;
			font-size: 0.6rem;
			padding-top: 0;
			opacity: 0.5
		}
		.p1{
			text-align: center;
			color:#fbc388;
			font-size: 0.65rem;
			padding-top: 0.75rem;
		}
		.p1 span{
			padding: 0 0.15rem;
		}
		#qiandao_msg .text img{
			width: 5rem;
			margin: 0 auto;
			text-align: center;
			margin-top: 1.3rem;
		}
		@-webkit-keyframes kaishi{
		  0% {
				transform: rotateY(0deg);
			}
			100% {
				transform: rotateY(360deg);
			}
		}
		.donghua{
			animation: kaishi 1s  linear infinite;
		}
	</style>
</head>
<body>
	<div id="t"></div>
	<div id="qiandao_msg" class="zhuli">
		<div class="animated bounceIn">
			<div class="img">
				<img  src="../i/hongbao/kai.png" id="zhuli" />
				<div class="text">
					<span>速翔网络</span>
					<img tapmode onclick="kaishi()" class="" src="../i/hongbao/kaishi.png" >
				</div>
				<div class="xia">
					<div class="x1">
						<img src="../i/hongbao/kai_xia.png" >
						<div class="x1_text">
							<h4>给你发红包</h4>
							<p>限量领取快来抢</p>
						</div>
					</div>
					<div class="p1">
						还剩余<span>0</span>个
					</div>
				</div>

			</div>
			<!-- <div class="btn">
				<div class="x" tapmode onclick="x()"><img src="../i/x.png" /></div>
			</div> -->
		</div>
	</div>
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script src="../j/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
		function urlsa() {
			var imglen = $("img").length;
			var picurls = picurl + "/hongbao";
			for (var i = 0; i < imglen; i++) {
				var tpl = $("img").eq(i).attr("src");
				// console.log(tpl)
				tpls = tpl.replace("../i/hongbao", picurls);
				$("img").eq(i).attr("src", tpls);
		
			}
		}
	apiready = function() {
		urls();
		$('.text span').text(_getPrefs('_config').config.dtitle);
		$('.x1_text h4').text(_getPrefs('_config').config.dtitle+'给你发红包');
		$('.xia .p1 span').text(api.pageParam['hongbao_num']);
	}
	var ajax = false;
	function kaishi(){
		if(!_getPrefs('_user')){
			return _login();
		}
		if(ajax){
			return _msg('请稍候');
		}
		ajax = true;
		$('.text img').addClass('donghua');
		_ajax('renwu/hongbao_user',function(ret,err){
			if(ret){
				if(ret.ret){
					api.execScript({
							script: 'data('+ret.ret+');'
					});
					return;
				}else{
					_msg(ret.err);
				}
			}
			ajax = false;
		})
	}
	function x(){
		api.closeFrame();
	}
	function tan(money){
		var url = 'hongbao_tixian_msg';
		api.openFrame({
			name: url,
			url: _h_w + url + '.html',
			rect: {
				x: 0,
				y: 0,
				w: 'auto',
				h: 'auto',
			},
			bgColor: 'rgba(0,0,0,0)',
			pageParam:{
				money:money
			}
		})
	}
</script>

</html>
